#pragma GCC optimize(2)
#include <bits/stdc++.h>

using namespace std;
#define int long long
const int inf = 0x3f3f3f3f3f3f3f3f;
const int Mod = 998244353;
int qpow(int a, int b)
{
    int ret = 1;
    while (b > 0)
    {
        if (b & 1)
            ret = ret * a % Mod;
        a = a * a % Mod;
        b >>= 1;
    }
    return ret;
}

void solve()
{
    int x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    int dx = x2 - x1, dy = y2 - y1;
    if (dx != 0)
    {
        if (dx % 2 == 0) cout << x1 << ' ' << y1 + 1 << endl;
        else cout << x1 << ' ' << y1 + 2 << endl;
    }
    else
    {
        if (dy % 2 == 0) cout << x1 + 1 << ' ' << y1 << endl;
        else cout << x1 + 2 << ' ' << y1 << endl;
    }
}

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int _ = 1;
    //cin >> _;
    while (_--)
    {
        solve();
    }
    return 0;
}